#!/user/bin/env python3
# -*- coding: utf-8 -*-
"""
--------------------------------------
    Author:     JiChao_Song
    Date  :     2020/12/22 17:34
    Desc  :
--------------------------------------
"""
import datetime
import time

from common.libs.QuerySetUtils import QuerySetUtils
from servers.models.CasesRecordModel import CasesRecord
from servers.servers.BaseServices import BaseServices


class CasesRecordServices(BaseServices):

    def __init__(self, document=CasesRecord):
        super().__init__(document)


def add_case_record(**kwargs):
    """
    新增测试记录
    :param kwargs:
    :return:
    """
    kwargs = QuerySetUtils(CasesRecord).filterField(kwargs)
    case_record = CasesRecord(**kwargs, createData = time.time() * 1000)
    case_record.save()
